import request from '@/utils/request'

// 分页查询激活码列表
export function listActivation(query) {
  return request({
    url: '/work/activation/list',
    method: 'post',
    data: query
  })
}

// 统计激活码数量
export function countActivation(query) {
  return request({
    url: '/work/activation/count',
    method: 'post',
    data: query
  })
}

// 查询激活码列表
export function queryActivation(query) {
  return request({
    url: '/work/activation/query',
    method: 'post',
    data: query
  })
}

// 查询激活码详细
export function getActivation(id) {
  return request({
    url: '/work/activation/get',
    method: 'post',
    data:{id:id}
  })
}

// 新增激活码
export function addActivation(data) {
  return request({
    url: '/work/activation/add',
    method: 'post',
    data: data
  })
}


export function addFastActivation(data) {
  return request({
    url: '/work/activation/addFast',
    method: 'post',
    data: data
  })
}


export function addAdminActivation(data) {
  return request({
    url: '/work/activation/addAdmin',
    method: 'post',
    data: data
  })
}

// 修改激活码
export function updateActivation(data) {
  return request({
    url: '/work/activation/update',
    method: 'post',
    data: data
  })
}

// 删除激活码
export function delActivation(id) {
  return request({
    url: '/work/activation/delete/' + id,
    method: 'post'
  })
}
